package test

import config.MyFile
import org.apache.commons.io.FileUtils
import scala.jdk.CollectionConverters._

object test7 extends MyFile {

  def main(args: Array[String]): Unit = {
    "H:\\紫花苜蓿数据库\\2023_1_9\\变异/snp_freq".listFile.foreach { x =>
      val lines = x.readLines.map(_.split("\t")(1))
      val name = x.getName
      FileUtils.writeLines(s"H:\\紫花苜蓿数据库\\2023_1_9\\变异\\snp_freq_index/$name".toFile,lines.asJava)
    }
  }

  def dealWithSnp = {
    "H:\\紫花苜蓿数据库\\2022_12_19\\bianyi\\snp".listFile.foreach { x =>
      val lines = x.readLines.map(_.split("\t")(1))
      val name = x.getName
      FileUtils.writeLines(s"H:\\紫花苜蓿数据库\\2022_12_19\\bianyi\\snpIndex/$name".toFile,lines.asJava)
    }
  }
}
